#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStandardItemModel>
#include <QItemSelectionModel>
#include <QLabel>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

#define FixedColumnCount 6  //文件固定6行

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void initModelFromStringList(QStringList &stringList);

private:
    Ui::MainWindow *ui;

    QLabel *lCurFile;
    QLabel *lCurCellPos;
    QLabel *lCurCellContent;

    QStandardItemModel *standardItemModel;
    QItemSelectionModel *itemSelectionModel;

private slots:
    //当前单元格发生变化
    void on_currentIndexChanged(const QModelIndex &current, const QModelIndex &previous);
    void on_actOpen_triggered();
};
#endif // MAINWINDOW_H
